package csw;


public class J12SungJuk {

	public static void main(String[] args) {
		
		J12SungJuk taehui = new J12SungJuk();
		J12SungJuk suji = new J12SungJuk();
		J12SungJuk jihyun = new J12SungJuk();
		
		taehui.name = "태희";
		taehui.kor = 99;
		taehui.eng = 89;
		taehui.mat = 79;
		System.out.println(taehui.name);
		System.out.println(taehui.getTotal());
		System.out.println(taehui.getAverage());
		System.out.println(taehui.getGrade());
		
		taehui.name = "수지";
		taehui.kor = 98;
		taehui.eng = 87;
		taehui.mat = 76;
		System.out.println(taehui.name);
		System.out.println(taehui.getTotal());
		System.out.println(taehui.getAverage());
		System.out.println(taehui.getGrade());
		
		taehui.name = "지현";
		taehui.kor = 92;
		taehui.eng = 84;
		taehui.mat = 73;
		System.out.println(taehui.name);
		System.out.println(taehui.getTotal());
		System.out.println(taehui.getAverage());
		System.out.println(taehui.getGrade());
		
	}//main
	
		int kor;
		int mat;
		int eng;
		int tot;
		String name;
		double avg;
		char grd;
		
		
		public int getTotal(){
			return kor+eng+mat;
			
		}
		
		public int getAverage(){
			return getTotal()/3;
			
		}
		
		public char getGrade(){	
			switch((int)getAverage()/10){
			case 10: 
			case 9: grd = '수'; break;
			case 8: grd = '우'; break;
			case 7: grd = '미'; break;
			case 6: grd = '양'; break;
			default : grd = '가';
		}
		
		return grd;
	}
		

}//class
